package com.xwl.mybasepro.utils.http.okhttp;

import io.reactivex.Flowable;
import io.reactivex.FlowableTransformer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public class RxSchedulers {
	public static <T> FlowableTransformer<T, T> compose() {
		return new FlowableTransformer<T, T>() {
			@Override
			public Flowable<T> apply(Flowable<T> observable) {
				return observable
						.subscribeOn(Schedulers.io())
						.observeOn(AndroidSchedulers.mainThread());
			}
		};
	}
}
